﻿@using System.Web.Optimization
@using KRM.Core
@using KRM.Core.Library
@using KRM.Web.App_Start


<!doctype html>
<html>
<head>
    <meta charset="utf8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="ROBOTS" content="NOINDEX, NOFOLLOW">
    <!-- Apple devices fullscreen -->
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <!-- Apple devices fullscreen -->
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
    <title>@ViewBag.Title</title>
    @Styles.Render("~/bundles/css")
    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/js")
    <script src="/signalr/hubs" type="text/javascript"></script>
    <script src="~/js/espresso.js"></script>
    <!-- Favicon -->
    <link rel="shortcut icon" href="/img/favicon.ico" />
</head>

<body class="newsfeedlayout">
    @if (tblCompanyVariable.ListIpAccessKRMWeb.Contains(Request.UserHostAddress))
    {
        <!-- BEGIN HEADER -->
        <div class="header navbar navbar-inverse navbar-fixed-top ">
            <!-- BEGIN TOP NAVIGATION BAR -->
            <div class="header-inner">
                <!-- BEGIN LOGO -->
                @*<a class="navbar-brand" href="/" style="padding-top: 10px; padding-bottom: 10px">
                    <img src="/hr/img/logo.png" alt="logo" class="img-responsive" style="height: 24px">
                </a>*@
                <a class="navbar-brand" href="/" style="padding-top: 6px; padding-bottom: 0px">
                    <img src="/hr/img/logokybotech.png" alt="logo" class="img-responsive" style="height: 31px;">
                </a>
                <!-- END LOGO -->
                <!-- BEGIN RESPONSIVE MENU TOGGLER -->
                <a href="javascript:;" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    <img src="/hr/img/menu-toggler.png" alt="" style="padding-top: 6px;">
                </a>
                <!-- END RESPONSIVE MENU TOGGLER -->
                <!-- BEGIN TOP NAVIGATION MENU -->
                <ul class="nav navbar-nav pull-right">
                    <li class="order-search-top">
                        <form action="/orderview/orderdetail" class="nomargin" target="_blank">
                            <div class="input-prepend">
                                <button type="submit" class="btn btnSearchOrder">Order Ref</button>
                                <input type="text" class="span2 search-query" name="orderref" />
                            </div>
                        </form>
                    </li>
                </ul>
                <!-- END TOP NAVIGATION MENU -->
            </div>
            <!-- END TOP NAVIGATION BAR -->
        </div>
        <!-- END HEADER -->

        <div class="clearfix"></div>
        <!-- BEGIN CONTAINER -->
        <div class="newsfeedcontainer">
            <div class="newsfeedcol-left">
                @RenderBody()
            </div>
            <div class="newsfeedcol-right">
                <div class="loginnewsfeed">
                    <form class="login-form" action="/users/login" method="post" novalidate="novalidate" autocomplete="off">
                        <input type="hidden" name="returnurl" value="@ViewBag.ReturnUrl" />
                        @Html.AntiForgeryToken()
                        <h3 class="form-title text-center">KRM Login</h3>
                        @Html.Partial("Partial/_MessageResult")
                        <div id="msg-login">
                            @Html.ValidationSummary(true)
                        </div>
                        <div class="form-group">
                            <!--ie8, ie9 does not support html5 placeholder, so we just show field title for that-->
                            <label class="control-label visible-ie8 visible-ie9">Username</label>
                            <div class="input-icon">
                                <i class="icon-user"></i>
                                <input class="form-control input-block-level" type="text" autocomplete="off" id="username" name="username">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label visible-ie8 visible-ie9">Password</label>
                            <div class="input-icon">
                                <i class="icon-lock"></i>
                                <input class="form-control input-block-level" type="password" name="password">
                            </div>
                        </div>
                        <div class="form-group">
                            @Html.Raw(Html.GenerateCaptcha())
                        </div>
                        <div class="text-right margin-top-15">
                            <button type="submit" class="btn btn-primary w100">
                                Login <i class="m-icon-swapright m-icon-white"></i>
                            </button>
                        </div>
                        <div class="forget-password">
                            <h4>Forgot your password ?</h4>
                            <p>
                                Please contact  <a href="mailto:IT.Support@kybotech.co.uk">IT.Support@kybotech.co.uk</a>
                                to reset your password.
                            </p>
                        </div>
                    </form>
                </div>
            </div>

        </div>
        <!-- END CONTAINER -->
    }
    else
    {
        @RenderBody()
        Response.Redirect("/users/invalidipaddress");
    }
    <!-- jQuery -->
    @RenderSection("Scripts", false)
    @Scripts.Render("~/bundles/function")
    <script>
        (function (i, s, o, g, r, a, m) {
            i['GoogleAnalyticsObject'] = r;
            i[r] = i[r] || function () {
                (i[r].q = i[r].q || []).push(arguments)
            }, i[r].l = 1 * new Date();
            a = s.createElement(o),
            m = s.getElementsByTagName(o)[0];
            a.async = 1;
            a.src = g;
            m.parentNode.insertBefore(a, m)
        })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
        ga('create', 'UA-6581490-8', 'loveespres.so');
        ga('send', 'pageview');
    </script>
</body>
</html>

